package com.bkgy.modular.hotcoldedgeanalyse.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.modular.hotcoldedgeanalyse.service.HotEdgeSameService;
import com.bkgy.sys.common.entity.ResultData;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@RestController
@CrossOrigin
@RequestMapping("/HotEdgeSame")
public class HotEdgeSameController {
    @Resource
    private HotEdgeSameService hotEdgeSameService;

    @PostMapping("/findDataByPage")
    public ResultData findDataByPage(@RequestBody JSONObject json){
        return hotEdgeSameService.findDataByPage(json);
    }

    @PostMapping("/findLineDataByVolumeNo")
    public ResultData findLineDataByVolumeNo(@RequestBody JSONObject json){
        return hotEdgeSameService.findLineDataByVolumeNo(json);
    }

    /**
     * 列表导出功能
     * @param jsonObject
     * @param response
     */
    @PostMapping("/exportXlsx")
    public void export(@RequestBody JSONObject jsonObject, HttpServletResponse response) {
        hotEdgeSameService.export(jsonObject,response);
    }
}
